<?php

namespace app\api\controller\contract;
use app\shop\service\Contract as ContractService;
/**
 * 公司介绍
 */
class Contract
{
    public function list(ContractService $ContractService){
        $data = input('post.');
        $data['user_id'] = request()->user_id;
        $result = $ContractService->list($data);
        return $result;
    }
    public function info(ContractService $ContractService){
        $id = input('id');
        $result = $ContractService->info($id);
        return $result;
    }
    public function add(ContractService $ContractService){
        $data = input('post.');
        $result = $ContractService->add($data);
        return $result;
    }
    public function edit(ContractService $ContractService){
        $data = input('post.');
        $data['user_id'] = request()->user_id;
        $result = $ContractService->edit($data);
        return $result;
    }
    public function pdf(ContractService $ContractService){
        $id = input('id');
        $result = $ContractService->createPdf($id);
        return $result;
    }
    public function sign(ContractService $ContractService){
        $data = input('post.');
        $result = $ContractService->sign($data);
        return $result;
    }
}